<template>
  <CloudDropdown>
    <CloudButton class="ant-dropdown-link" @click="(e) => e.preventDefault()">
      Hover me, Click menu item <CloudIcon type="down" />
    </CloudButton>
    <CloudMenu slot="overlay" @click="onClick">
      <CloudMenuItem key="1"> 1st menu item </CloudMenuItem>
      <CloudMenuItem key="2"> 2nd menu item </CloudMenuItem>
      <CloudMenuItem key="3"> 3rd menu item </CloudMenuItem>
    </CloudMenu>
  </CloudDropdown>
</template>

<script>
  export default {
    title: '7.触发事件',
    methods: {
      onClick ({ key }) {
        console.log(`Click on item ${key}`);
      },
    },
  };
</script>